import { request } from './request'

// 获取最新音乐 http://msearchcdn.kugou.com/api/v3/search/song?
// showtype=14&highlight=em&pagesize=30&tag_aggr=1&tagtype=全部&plat=0&sver=5&keyword=你好&correct=1&api_ver=1&version=9108&page=1&area_code=1&tag=1&with_res_tag=1
export function GetSong(keywords) {
  return request({
    url: `music/search`,
    params: {
      keywords,
      limit: 20,
    },
  })
}

// 获取音乐播放地址
export function GetPlayMisicUrl(id) {
  return request({
    url: 'music/song/url',
    params: {
      id,
    },
  })
}

// 获取歌词
export function GetPlayMisicLyric(ids) {
  return request({
    url: 'music/song/detail',
    params: {
      ids,
    },
  })
}
